<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/28
 * Time: 10:47
 */
namespace common\component;
use Yii;
use yii\base\Model;

class UploadForm extends Model
{
    /**
     * @var UploadedFile|Null file attribute
     */
    public $file;

    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            [['file'], 'file', 'maxFiles' => 10,'extensions'=>'jpg,png,gif'],
        ];
    }

    public function attributeLabels(){
        return [
            'file'=>'多文件上传'
        ];
    }
}